package com.fivestar.pmanager.web.vo;

import java.util.ArrayList;
import java.util.List;

public class TreeModule
{
    private Integer rowId;
    private String moduleName;
    private String moduleCode;
    private String parentId;
    private String moduleUrl;
    private List<TreeModule> childs;
    private boolean hasSub = false;

    public TreeModule(){}

    public TreeModule(Integer rowId, String moduleName, String moduleCode,
            String parentId, String moduleUrl)
    {
        this.rowId = rowId;
        this.moduleName = moduleName;
        this.moduleCode = moduleCode;
        this.parentId = parentId;
        this.moduleUrl = moduleUrl;
    }


    public Integer getRowId()
    {
        return rowId;
    }


    public void setRowId(Integer rowId)
    {
        this.rowId = rowId;
    }


    public String getModuleName()
    {
        return moduleName;
    }


    public void setModuleName(String moduleName)
    {
        this.moduleName = moduleName;
    }


    public String getModuleCode()
    {
        return moduleCode;
    }


    public void setModuleCode(String moduleCode)
    {
        this.moduleCode = moduleCode;
    }


    public String getParentId()
    {
        return parentId;
    }


    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }


    public String getModuleUrl()
    {
        return moduleUrl;
    }


    public void setModuleUrl(String moduleUrl)
    {
        this.moduleUrl = moduleUrl;
    }


    public List<TreeModule> getChilds()
    {
        if(childs == null) childs = new ArrayList<>();
        return childs;
    }


    public void setChilds(List<TreeModule> childs)
    {
        this.childs = childs;
    }


    public boolean isHasSub()
    {
        return hasSub;
    }


    public void setHasSub(boolean hasSub)
    {
        this.hasSub = hasSub;
    }
}
